import request from '@/utils/request'
import { exportMethod } from '@/utils/utils'
import * as proxy from '@/constants/proxy'
//国际交流合作
//国际科技项目
// 列表数据
export function getProjectsList(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/project/list',
        method: 'post',
        data
    })
}
//根据id获取详情
export function getProjectsDetail(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/project/getDetailById/${id}`,
        method: 'get',
    })
}
//新增
export function getAddProjects(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/project/add',
        method: 'post',
        data
    })
}
//删除
export function deleteTechnologyProjects(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/project/${id}`,
        method: 'delete'
    })
}
//新增文件
export function getAddFileProjects(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/project/addFile',
        method: 'post',
        data
    })
}
//导出
export function getExportFile(data: any,fileName) {
    const params = {
        method: 'post',
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/project/export',
        data: data,
        fileName:fileName
    }
    return exportMethod(params)
}

//锁定
export function getLockProjects(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/project/lock/${id}`,
        method: 'get'
    })
}

//解锁
export function getUnlockProjects(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/project/unlock/${id}`,
        method: 'get'
    })
}

//修改  
export function getUpdateProjects(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/project/update',
        method: 'post',
        data
    })
}

//确认
export function getConfirmProjects(id: any) {
    return request({
      url: proxy.CHECC_API_CMS + `/kjsl/iexchange/project/confirm/${id}`,
      method: 'get'
    })
  }




//国际人才交流
// 列表数据
export function getTalentList(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/talent/list',
        method: 'post',
        data
    })
}
//根据id获取详情
export function getTalentDetail(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/talent/getDetailById/${id}`,
        method: 'get',
    })
}
//新增
export function getAddTalent(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/talent/add',
        method: 'post',
        data
    })
}
//删除
export function deleteTalent(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/talent/${id}`,
        method: 'delete'
    })
}
//新增文件
export function getAddFileTalent(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/talent/addFile',
        method: 'post',
        data
    })
}
//导出
export function getExportTalent(data: any,fileName) {
    const params = {
        method: 'post',
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/talent/export',
        data: data,
        fileName:fileName
    }
    return exportMethod(params)
}

//锁定
export function getLockTalent(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/talent/lock/${id}`,
        method: 'get'
    })
}

//解锁
export function getUnlockTalent(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/talent/unlock/${id}`,
        method: 'get'
    })
}

//修改  
export function getUpdateTalent(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/talent/update',
        method: 'post',
        data
    })
}

//确认
export function getConfirmTalent(id: any) {
    return request({
      url: proxy.CHECC_API_CMS + `/kjsl/iexchange/talent/confirm/${id}`,
      method: 'get'
    })
  }


//国际会议交流
// 列表数据
export function getMettingList(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/metting/list',
        method: 'post',
        data
    })
}
//根据id获取详情
export function getMettingDetail(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/metting/getDetailById/${id}`,
        method: 'get',
    })
}
//新增
export function getAddMetting(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/metting/add',
        method: 'post',
        data
    })
}
//删除
export function deleteMetting(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/metting/${id}`,
        method: 'delete'
    })
}
//新增文件
export function getAddFileMetting(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/metting/addFile',
        method: 'post',
        data
    })
}
//导出
export function getExportMetting(data: any,fileName) {
    const params = {
        method: 'post',
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/metting/export',
        data: data,
        fileName:fileName
    }
    return exportMethod(params)
}

//锁定
export function getLockMetting(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/metting/lock/${id}`,
        method: 'get'
    })
}

//解锁
export function getUnlockMetting(id: any) {
    return request({
        url: proxy.CHECC_API_CMS + `/kjsl/iexchange/metting/unlock/${id}`,
        method: 'get'
    })
}

//修改  
export function getUpdateMetting(data: any) {
    return request({
        url: proxy.CHECC_API_CMS + '/kjsl/iexchange/metting/update',
        method: 'post',
        data
    })
}

//确认
export function getConfirmMetting(id: any) {
    return request({
      url: proxy.CHECC_API_CMS + `/kjsl/iexchange/metting/confirm/${id}`,
      method: 'get'
    })
  }

